﻿#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>

namespace Ui {
class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT
public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();

signals:
    void SignalCanConnect(unsigned long, unsigned long);
    void SignalCanStart();
    void SignalCanRestart();
    void SignalCanStop();

public slots:
    void SlotCanRecv(QString&);
    void SlotCanLog(QString&);

private slots:
    void on_connectBtn_clicked();

    void on_startBtn_clicked();

    void on_restartBtn_clicked();

private:
    QString getCanTimeStampStr(unsigned long);

private:
    Ui::MainWindow *ui;

    bool isOpen = false;
    bool isConnect = false;
};

#endif // MAINWINDOW_H
